

<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
    <style>
    /* base */
    html,
    body,
    .container {
      width: 100%;
      height: 100%;
    }

    a,
    a:link,
    a:visited {
      text-decoration: none;
      color: inherit;
    }

    ul {
      list-style: none;
    }

    *,
    ::before,
    ::after {
      box-sizing: border-box;
      margin: 0;
      padding: 0;
    }

    *:focus {
      outline: 0;
    }

    .container {
      display: flex;
      padding-top: 20px;
    }

    /* Nav */
    .container .doc-nav {
      position: fixed;
      height: 100%;
      margin: 0 30px 0 40px;
      width: 280px;
    }

    .doc-nav .nav-header {
      display: flex;
      align-items: center;
      box-sizing: border-box;
      background-color: rgb(240, 241, 242);
      height: 40px;
      padding: 16px;
      font-size: 18px;
      font-weight: 500;
      color: rgb(62, 64, 66);
      cursor: pointer;
    }

    .doc-nav .nav-content {
      height: calc(100% - 40px);
      overflow-y: auto;
      color: rgb(32, 34, 36);
    }

    .doc-nav .nav-content .nav-list,
    .doc-nav .nav-content .nav-sub-list {
      line-height: 1.5rem;
    }

    .doc-nav .nav-content .nav-label {
      display: inline-block;
      position: relative;
      padding: 2px 0 2px 20px;
      margin-bottom: 4px;
    }

    .doc-nav .nav-content .nav-sub-label {
      position: relative;
      padding: 2px 0 2px 40px;
      font-size: 14px;
    }

    .doc-nav .nav-content .nav-sub-label:hover {
      text-decoration: underline;
    }

    .doc-nav .nav-content .nav-list .nav-label.group::before {
      border-bottom: 0.25rem solid transparent;
      border-left: 0.25rem solid #6e7072;
      border-right: 0;
      border-top: 0.25rem solid transparent;
      content: '';
      display: block;
      height: 0;
      left: 0.5rem;
      position: absolute;
      top: 0.625rem;
      transition: transform 0.1s linear;
      width: 0;
    }

    .doc-nav .nav-content .nav-list .nav-label.group.active::before {
      transform: rotate(90deg);
    }

    /* doc content */
    .container .doc-content {
      position: fixed;
      height: 100%;
      width: calc(100% - 80px - 40px - 30px - 240px);
      right: 0%;
      overflow-y: auto;
    }

    .doc-title {
      border-bottom: 1px solid #dcdee0;
      font-size: 22px;
      margin: 8px 0 0;
      padding-bottom: 16px;
    }

    .doc-content h3 {
      font-size: 24px;
      font-weight: 600;
      margin: 24px 0;
    }

    .doc-content h4 {
      font-size: 22px;
      font-weight: 500;
      margin: 30px 0 8px;
    }

    .doc-content h4 span {
      color: #007d9c;
    }

    .doc-content .doc-declare {
      background-color: #fafafa;
      border-radius: 5px;
      border: 1px solid #ccc;
      font-size: 14px;
      overflow-x: auto;
      padding: 10px;
      tab-size: 4;
      line-height: 20px;
    }

    .doc-content .doc-comment {
      font-size: 16px;
      margin: 16px 0;
      line-height: 24px;
      word-break: break-word;
    }
  </style>

</head>
<body>
  <div class="container">
    <div class="doc-nav">
      <a href="#Documentation" class="nav-header">Documentation</a>
      <nav class="nav-content">
        <ul class="nav-list">
          <li>
            <a href="#includes" class="nav-label">Includes</a>
             
            <ul class="nav-sub-list">

              <li>
                <a href="#string.h" class="nav-sub-label">string.h</a>
              </li>
      
            </ul>
            
          </li>
          <li>
            <a href="#macros" class="nav-label">Macros</a>
             
            <ul class="nav-sub-list">

              <li>
                <a href="#COAP_STR_H_" class="nav-sub-label">COAP_STR_H_</a>
              </li>
      

              <li>
                <a href="#COAP_SET_STR(st,l,v)" class="nav-sub-label">COAP_SET_STR(st,l,v)</a>
              </li>
      

              <li>
                <a href="#coap_make_str_const(CStr)" class="nav-sub-label">coap_make_str_const(CStr)</a>
              </li>
      

              <li>
                <a href="#coap_make_str_const(string)" class="nav-sub-label">coap_make_str_const(string)</a>
              </li>
      

              <li>
                <a href="#coap_string_equal(string1,string2)" class="nav-sub-label">coap_string_equal(string1,string2)</a>
              </li>
      
            </ul>
            
          </li>
          <li>
            <a href="#functions" class="nav-label">Functions</a>
             
            <ul class="nav-sub-list">

              <li>
                <a href="#coap_delete_string" class="nav-sub-label">coap_delete_string</a>
              </li>
      

              <li>
                <a href="#coap_delete_str_const" class="nav-sub-label">coap_delete_str_const</a>
              </li>
      
            </ul>
            
          </li>
          <li>
            <a href="#vars" class="nav-label">Vars</a>
             
            <ul class="nav-sub-list">

              <li>
                <a href="#coap_string_t" class="nav-sub-label">coap_string_t</a>
              </li>
      

              <li>
                <a href="#coap_str_const_t" class="nav-sub-label">coap_str_const_t</a>
              </li>
      
            </ul>
            
          </li>
          <li>
            <a href="#consts" class="nav-label">Consts</a>
            
            <ul class="nav-sub-list">
            
            </ul>
            
          </li>
          <li>
            <a href="#types" class="nav-label">Types</a>
            
            <ul class="nav-sub-list">
            
            </ul>
            
          </li>
          <li>
            <a href="#typedefs" class="nav-label">Typedefs</a>
             
            <ul class="nav-sub-list">

              <li>
                <a href="#coap_string_t;
" class="nav-sub-label">coap_string_t;
</a>
              </li>
      

              <li>
                <a href="#coap_str_const_t;
" class="nav-sub-label">coap_str_const_t;
</a>
              </li>
      

              <li>
                <a href="#coap_binary_t;
" class="nav-sub-label">coap_binary_t;
</a>
              </li>
      
            </ul>
            
          </li>
        </ul>
      </nav>
    </div>
    <div class="doc-content">
      <h2 id="Documentation" class="doc-title">Documentation</h2>
      <h3 id="includes">Includes</h3>
      

      <h4 id="string.h"><span>string.h</span></h4>
      <pre class="doc-declare"><code>#include &lt;string.h&gt;
</code></pre>
      <pre class="doc-comment">#include <string.h>
</pre>
      <h3 id="macros">Macros</h3>
      

      <h4 id="COAP_STR_H_">Marco <span>COAP_STR_H_</span></h4>
      <pre class="doc-declare"><code>#define COAP_STR_H_
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="COAP_SET_STR(st,l,v)">Marco <span>COAP_SET_STR(st,l,v)</span></h4>
      <pre class="doc-declare"><code>#define COAP_SET_STR(st,l,v) { (st)->length = (l), (st)->s = (v); }
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="coap_make_str_const(CStr)">Marco <span>coap_make_str_const(CStr)</span></h4>
      <pre class="doc-declare"><code>#define coap_make_str_const(CStr)                                      \
 libcoap::CoAPStrConst{sizeof(CStr)-1, reinterpret_cast<const uint8_t *>(CStr)}
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="coap_make_str_const(string)">Marco <span>coap_make_str_const(string)</span></h4>
      <pre class="doc-declare"><code>#define coap_make_str_const(string)                                    \
 (&(coap_str_const_t){sizeof(string)-1,(const uint8_t *)(string)})
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="coap_string_equal(string1,string2)">Marco <span>coap_string_equal(string1,string2)</span></h4>
      <pre class="doc-declare"><code>#define coap_string_equal(string1,string2) \
       ((string1)->length == (string2)->length && ((string1)->length == 0 || \
        memcmp((string1)->s, (string2)->s, (string1)->length) == 0))
</code></pre>
      <pre class="doc-comment">/**
 * Compares the two strings for equality
 *
 * @param string1 The first string.
 * @param string2 The second string.
 *
 * @return         @c 1 if the strings are equal
 *                 @c 0 otherwise.
 */</pre>
      <h3 id="functions">Functions</h3>
      

      <h4 id="coap_delete_string">Func <span>coap_delete_string</span></h4>
      <pre class="doc-declare"><code>void coap_delete_string(coap_string_t *string);</code></pre>
      <pre class="doc-comment">/**
 * Deletes the given string and releases any memory allocated.
 *
 * @param string The string to free off.
 */</pre>

      <h4 id="coap_delete_str_const">Func <span>coap_delete_str_const</span></h4>
      <pre class="doc-declare"><code>void coap_delete_str_const(coap_str_const_t *string);</code></pre>
      <pre class="doc-comment">/**
 * Deletes the given const string and releases any memory allocated.
 *
 * @param string The string to free off.
 */</pre>
      <h3 id="vars">Vars</h3>
      

      <h4 id="coap_string_t">Variable <span>coap_string_t</span></h4>
      <pre class="doc-declare"><code>coap_string_t *coap_new_string(size_t size);</code></pre>
      <pre class="doc-comment">/**
 * Returns a new string object with at least size+1 bytes storage allocated.
 * The string must be released using coap_delete_string().
 *
 * @param size The size to allocate for the binary string data.
 *
 * @return       A pointer to the new object or @c NULL on error.
 */</pre>

      <h4 id="coap_str_const_t">Variable <span>coap_str_const_t</span></h4>
      <pre class="doc-declare"><code>coap_str_const_t *coap_new_str_const(const uint8_t *data, size_t size);</code></pre>
      <pre class="doc-comment">/**
 * Returns a new const string object with at least size+1 bytes storage
 * allocated, and the provided data copied into the string object.
 * The string must be released using coap_delete_str_const().
 *
 * @param data The data to put in the new string object.
 * @param size The size to allocate for the binary string data.
 *
 * @return       A pointer to the new object or @c NULL on error.
 */</pre>
      <h3 id="consts">Consts</h3>
      
      <h3 id="types">Types</h3>
      
      <h3 id="typedefs">Typedefs</h3>
      

      <h4 id="coap_string_t;
">Typedef <span>coap_string_t;
</span></h4>
      <pre class="doc-declare"><code>typedef struct coap_string_t {
 size_t length;   /**< length of string */
 uint8_t *s;      /**< string data */
} coap_string_t;
</code></pre>
      <pre class="doc-comment">/**
 * Coap string data definition
 */</pre>

      <h4 id="coap_str_const_t;
">Typedef <span>coap_str_const_t;
</span></h4>
      <pre class="doc-declare"><code>typedef struct coap_str_const_t {
 size_t length;   /**< length of string */
 const uint8_t *s; /**< string data */
} coap_str_const_t;
</code></pre>
      <pre class="doc-comment">/**
 * Coap string data definition with const data
 */</pre>

      <h4 id="coap_binary_t;
">Typedef <span>coap_binary_t;
</span></h4>
      <pre class="doc-declare"><code>typedef struct coap_binary_t {
 size_t length;   /**< length of binary data */
 uint8_t *s;      /**< binary data */
} coap_binary_t;
</code></pre>
      <pre class="doc-comment">/**
 * Coap binary data definition
 */</pre>
    </div>
  </body>
</html>
            